package webservice;

import javax.ejb.Remote;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;

import model.LoggedInUsers;
import model.User;
import exceptions.UsernameExistsException;

@WebService(name = "ChatServiceWSProxy", targetNamespace = "http://1337.webservice")
@SOAPBinding(style = Style.RPC, parameterStyle=ParameterStyle.WRAPPED, use=Use.LITERAL)
@Remote

public interface ChatServiceWS {
	@WebMethod(operationName="register")
	public User register(String username, String password) throws UsernameExistsException;
	
	@WebMethod(operationName="login")
	public User login(String username, String password);
	
	@WebMethod(operationName="logout")
	public boolean logout(User user);
	
	@WebMethod(operationName="getAllUsers")
	public LoggedInUsers getAllUsers();
}
